package cn.wp.ewallet.upms.web.controller;

import cn.wp.common.core.Wp;
import cn.wp.common.core.dto.WpResult;
import cn.wp.ewallet.upms.service.SystemRolesInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 角色控制类-控制层
 * Created by yangjin on 2019/12/25
 */
@RestController
@RequestMapping(Wp.WebContext + "/ewallet/upms/role")
@Api(tags="角色控制类")
public class SystemRolesInfoController {

    @Autowired
    private SystemRolesInfoService systemRolesInfoService;

    @GetMapping("/getAllRoles")
    @ApiOperation("获取当前登录用户可查看的所有成员和角色")
    public WpResult getAllRoles() {
        return systemRolesInfoService.getAllRoles();
    }

    @GetMapping("/getRoleList")
    @ApiOperation("查看所有的角色")
    public  WpResult getRoleList(){ return systemRolesInfoService.getRoleList();
    }
    @GetMapping("/getStaffInfoList")
    @ApiOperation("查看所有的员工名称")
    public WpResult getStaffInfoList(){
        return systemRolesInfoService.getStaffInfoList();
    }
}
